<script setup lang="ts">
import {ref} from 'vue';
const msg= ref('child msg');
const num = ref(123)
const handle = ()=>{
    console.log('调用子组件函数')
}
defineExpose({
    handle
})
</script>

<template>
    <h1>{{ msg }}</h1>
    <h1>{{ num }}</h1>
</template>